<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>资源区主页</title>
    <link rel="stylesheet" href="../css/spaces-resource-main.css">
    <link rel="stylesheet" href="../css/fenye.css">
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/space-resource-left.js"></script>
</head>

<body>
<!--**************顶部导航****************-->
<%@include file="../jsp/common/nav.jsp"%>
<!--**************左侧导航****************-->
<%@include file="../jsp/common/sidebar-scroll.jsp"%>
<!--***************空间右侧资源主界面*******************-->
<div class="right">
    <!--标题导航-->
    <div class="resource-nav">
        <span class="resource-nav-title"><a href="/index/main">学习空间</a></span>
        >
        <span class="resource-nav-title"><a href="/index/space-main?space_id=${space.id}&name=${space.name}">${space.name}</a></span>
        >
        <span>资源区</span>
    </div>
    <!--资源区头部-->
    <div class="resource-top">
        <div class="top-left">
            资源区
            <span><a href="/resource/space-resource-send">发布资源</a></span>
        </div>
        <div class="top-right">
            <span><a href="/resource/space-resource-filelist">附件列表</a></span>
            <span><a href="/resource/space-resource-search">查找资源</a></span>
        </div>
    </div>
    <div class="resource-content">
        <div class="content-top">
            <div class="content1">
                <span class="resource-name">资源名</span>
                <span class="writer">作者</span>
            </div>
            <div class="content2">
                <span class="detail">描述</span>
                <span class="date">更新时间</span>
            </div>
        </div>
        <c:forEach items="${relist}" var="list">
        <div class="resource-list">
            <ul>
                <li>
                    <div class="list">
                        <div class="content1">
                            <span class="resource-name">
                                <span class="nname"><a href="/resource/space-resource-show?id=${list.id}&space_id=${space.id}">${list.title}</a></span>
                                <span class="la">${list.label}</span>
                            </span>
                            <span class="writer">${list.author}</span>
                        </div>
                        <div class="content2">
                            <span class="detail">${list.detail}</span>
                            <span class="date"><fmt:formatDate value="${list.updatetime}" pattern="yyyy年M月dd日"/></span>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        </c:forEach>
    </div>
    <!--***************分页****************-->
    <div class="page">
        <ul>
            <li class="page_li">
                <a class="page_btn"id="prePage" href="/resource/space-resource?page=${currentPage-1}">
                    <
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn1" href="/resource/space-resource?page=1">
                    1
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="prePoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn2" href="/resource/space-resource?page=${currentPage-2}">
                    ${currentPage-2}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn3" href="/resource/space-resource?page=${currentPage-1}">
                    ${currentPage-1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn4" href="/resource/space-resource?page=${currentPage}">
                    ${currentPage}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn5" href="/resource/space-resource?page=${currentPage+1}">
                    ${currentPage+1}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn6" href="/resource/space-resource?page=${currentPage+2}">
                    ${currentPage+2}
                </a>
            </li>
            <li class="page_li"> <span class="pages_span" id="sufPoint">...</span> </li>
            <li class="page_li">
                <a class="page_btn" id="page_btn7" href="/resource/space-resource?page=${all}">
                    ${all}
                </a>
            </li>
            <li class="page_li">
                <a class="page_btn" id="sufPage" href="/resource/space-resource?page=${currentPage+1}">
                    >
                </a>
            </li>
        </ul>
    </div>
</div>
</body>
</html>
